home *** CD-ROM | disk | FTP | other *** search
- // $Id: arcs.vsl,v 1.2 1995/05/17 13:39:39 zeller Exp $ -- Boegen-Bibliothek fuer VSL
- //
- // Dies ist die VSL-Bibliothek fuer Boegen, wie sie in
- // Andreas Zeller: "Schraegen und Boegen fuer VSL"
- // beschrieben ist.
- //
-
- // Copyright (C) 1993 Technische Universitaet Braunschweig, Germany.
- // Written by Andreas Zeller (zeller@ips.cs.tu-bs.de).
- //
- // This file is part of the NORA Library.
- //
- // The NORA Library is free software; you can redistribute it and/or
- // modify it under the terms of the GNU Library General Public
- // License as published by the Free Software Foundation; either
- // version 2 of the License, or (at your option) any later version.
- //
- // The NORA Library is distributed in the hope that it will be useful,
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- // See the GNU Library General Public License for more details.
- //
- // You should have received a copy of the GNU Library General Public
- // License along with the NORA Library -- see the file COPYING.LIB.
- // If not, write to the Free Software Foundation, Inc.,
- // 675 Mass Ave, Cambridge, MA 02139, USA.
- //
- // NORA is an experimental inference-based software development
- // environment. Contact nora@ips.cs.tu-bs.de for details.
-
- // Version
- arcs_version() = "$RCSfile: arcs.vsl,v $ $Revision: 1.2 $";
-
- // Synonyme
- arcthickness() = rulethickness();
- arc(start, length) = arc(start, length, arcthickness());
-
- // Makros
- // Boegen
- arc360() = arc(0, 360);
- arc180(start) = arc(start, 180);
- arc90(start) = arc(start, 90);
-
- ne_arc90() = arc90(0);
- nw_arc90() = arc90(90);
- sw_arc90() = arc90(180);
- se_arc90() = arc90(270);
-
- n_arc180() = arc180(0);
- w_arc180() = arc180(90);
- s_arc180() = arc180(180);
- e_arc180() = arc180(270);
-
- // Ovale
- _ovalbody(box) = fix(hrule() | box | hrule());
- _oval(box) =
- fix(w_arc180() ^ (square(vspace(box) - 1) / box(2,1)))
- & box
- & fix(e_arc180() ^ (square(vspace(box) - 1) / box(2,1)));
- oval(box) = _oval(_ovalbody(whiteframe(box)));
-
- // Ellipsen
- ellipse() = arc360();
- _ellipse(box) = fix((space(box) * 2) ^ ellipse() ^ center(box));
- ellipse(box) = _ellipse(whiteframe(box, arcthickness() + whitethickness()));
-
- // Kreise
- _circle(box) = fix(square(box) ^ ellipse() ^ center(box));
- circle(box) = _circle(whiteframe(box, arcthickness() + whitethickness()));
-